Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action: Create a pull request with updated translations #675

Merged
merged 3 commits into from
Jul 27, 2023
Merged

GitHub Action: Create a pull request with updated translations #675

merged 3 commits into from
Jul 27, 2023

Conversation

lslezak
Copy link
Contributor

@lslezak lslezak commented Jul 27, 2023

Problem

The updated translations from the agama-weblate repository (which is managed by Weblate) need to be copied back to this main repository.

Solution

Define a GitHub Action which creates a pull request with the changes automatically. Using pull requests allows to review the changes and possibly postpone the merge if needed.

The action is run once a week or can be triggered manually if needed. If there is no change in the translations or only the time stamps are changed that the pull request is not created.

Notes

  • The GitHub Action does not check whether there is an older existing pull request with the same change, it always creates a new one if some update is found. The previous pull requests must be closed manually.
  • The web/po/* files from the cockpit-starter-kit template have been removed

Testing

Helper for merging the changes from the Weblate repository
to the main repository.
@coveralls
Copy link

coveralls commented Jul 27, 2023

Coverage Status

coverage: 72.051%. remained the same when pulling 680e2d6 on lslezak:master into c5c0aab on openSUSE:master.

.github/workflows/weblate-merge-po.yml Show resolved Hide resolved
cp -a ../agama-weblate/web/*.po web/po
git add web/po/*.po

- name: Validate the PO files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this fails I hope it is visible enough that we notice sooner than after a month :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point... I'll add a badge to the README.md so it is more visible...

lslezak and others added 2 commits July 27, 2023 17:00
Copy link
Contributor

@mvidner mvidner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better, thanks

@lslezak lslezak merged commit 2bc0c24 into agama-project:master Jul 27, 2023
7 checks passed
@imobachgs imobachgs mentioned this pull request Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants